Use g_value_take_string to avoid redundant invoking g_free.
authorHiroyuki Ikezoe <poincare@ikezoe.net>
Mon, 21 Dec 2009 06:34:06 +0000 (15:34 +0900)
committerJavier Jardón <jjardon@gnome.org>
Thu, 25 Mar 2010 15:34:46 +0000 (16:34 +0100)
gtk/gtkwidget.c

index 0202617598eaf8c3484815b3d5c6b6ac9634c03b..f02b481867489f0141a05fd854a4ee0e1f8a8c00 100644 (file)
@@ -2794,8 +2794,7 @@ gtk_widget_get_property (GObject         *object,
         if (escaped && !pango_parse_markup (escaped, -1, 0, NULL, &text, NULL, NULL))
           g_assert (NULL == text); /* text should still be NULL in case of markup errors */
 
-        g_value_set_string (value, text);
-        g_free (text);
+        g_value_take_string (value, text);
       }
       break;
     case PROP_TOOLTIP_MARKUP: